package org.huntaway.kindergarten.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the journal table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="journal"
 */

public abstract class BaseJournal extends BasePo implements Serializable {

	public static String REF = "Journal";
	public static String PROP_AMOUNT = "Amount";
	public static String PROP_INTRODUCTION = "Introduction";
	public static String PROP_BI_DATE = "BiDate";
	public static String PROP_ID = "Id";
	public static String PROP_BI_AUTHOR = "biAuthor";
	public static String PROP_REMARK = "Remark";


	// constructors
	public BaseJournal () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseJournal (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseJournal (
		java.lang.Integer id,
		org.huntaway.kindergarten.po.SysUser biAuthor,
		java.math.BigDecimal amount,
		java.util.Date biDate) {

		this.setId(id);
		this.setBiAuthor(biAuthor);
		this.setAmount(amount);
		this.setBiDate(biDate);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.math.BigDecimal amount;
	private java.util.Date biDate;
	private java.lang.String remark;
	private java.lang.String introduction;


	// many to one
	private org.huntaway.kindergarten.po.SysUser biAuthor;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="journal_id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: amount
	 */
	public java.math.BigDecimal getAmount () {
		return amount;
	}

	/**
	 * Set the value related to the column: amount
	 * @param amount the amount value
	 */
	public void setAmount (java.math.BigDecimal amount) {
		this.amount = amount;
	}



	/**
	 * Return the value associated with the column: bi_date
	 */
	public java.util.Date getBiDate () {
		return biDate;
	}

	/**
	 * Set the value related to the column: bi_date
	 * @param biDate the bi_date value
	 */
	public void setBiDate (java.util.Date biDate) {
		this.biDate = biDate;
	}



	/**
	 * Return the value associated with the column: remark
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: remark
	 * @param remark the remark value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}



	/**
	 * Return the value associated with the column: introduction
	 */
	public java.lang.String getIntroduction () {
		return introduction;
	}

	/**
	 * Set the value related to the column: introduction
	 * @param introduction the introduction value
	 */
	public void setIntroduction (java.lang.String introduction) {
		this.introduction = introduction;
	}

	/**
	 * Return the value associated with the column: bi_author
	 */
	public org.huntaway.kindergarten.po.SysUser getBiAuthor () {
		return biAuthor;
	}

	/**
	 * Set the value related to the column: bi_author
	 * @param biAuthor the bi_author value
	 */
	public void setBiAuthor (org.huntaway.kindergarten.po.SysUser biAuthor) {
		this.biAuthor = biAuthor;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof org.huntaway.kindergarten.po.Journal)) return false;
		else {
			org.huntaway.kindergarten.po.Journal journal = (org.huntaway.kindergarten.po.Journal) obj;
			if (null == this.getId() || null == journal.getId()) return false;
			else return (this.getId().equals(journal.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}